// -*- C++ -*------------------------------------------------------------------
//  $Id: Visitor.h,v 1.3 2008-05-09 13:58:35 biocomp Exp $
//
//  Class:              Visitor
//
//  Base Class(es):     -
//
//  Derived Class(es):  -
//
//  Containing:         -
//
//  Author:             Silvio Tosatto
//
//  Project Name:       Victor
//
//  Date:               03/00
//
//  Reviewed By:        <Name>
//
//  Description:
//    Base class implementing the visitor pattern for Group, ..., Spacer
//    NB: This is mostly used for implementing optimizers not contained in 
//    the Biopool2000 module (e.g. EnergyCalculator, SideChainPlacement)
//
// ---------------------------------------------------------------------------

#ifndef _VISITOR_H_
#define _VISITOR_H_

// Includes:
#include <Debug.h>

// Global constants, typedefs, etc. (to avoid):

namespace Biopool {
  
  class Group;
  class SideChain;
  class AminoAcid;
  class Spacer;
  
  class EnergyVisitor
  {
  public: 
    
    // CONSTRUCTORS/DESTRUCTOR:
    EnergyVisitor() {};
    // this class uses the implicit copy operator.
    virtual ~EnergyVisitor() {};  
    
    // MODIFIERS:
    virtual void PrepareGroup(Group& group) = 0;
    virtual void PrepareSideChain(SideChain& node) = 0;
    virtual void PrepareAminoAcid(AminoAcid& node) = 0;
    virtual void PrepareSpacer(Spacer& node) = 0;
    
  protected:
    
  private:

  };


  class OptimizationVisitor
  {
  public: 
    
    // CONSTRUCTORS/DESTRUCTOR:
    OptimizationVisitor() {};
    // this class uses the implicit copy operator.
  virtual ~OptimizationVisitor() {};  
    
    // MODIFIERS:
    virtual void PrepareGroup(Group& group) = 0;
    virtual void PrepareSideChain(SideChain& node) = 0;
    virtual void PrepareAminoAcid(AminoAcid& node) = 0;
    virtual void PrepareSpacer(Spacer& node) = 0;
    
  protected:
    
  private:
    
  };
  
} // namespace
#endif //_SAVER_H_
